from pyeasyaccept.gui.ChooseFacadePanel import ChooseFacadePanel
from pyeasyaccept.commom.Configuration import Configuration

import unittest
import wx
import os

"""
This class tests the 'ChooseFacadePanel' panel
@author: Artur Farias
"""
class ChooseFacadePanelTest(unittest.TestCase):
    
    """
    This method sets initial information
    """
    def setUp(self):
        self.app = wx.App()
        self.frame = wx.Frame(None, -1)
        self.panel = ChooseFacadePanel(self.frame, -1, [0,0], False)
        
        
    """
    This method tear down informations
    """
    def tearDown(self):
        self.app.Destroy()
        self.frame.Destroy()
        self.panel.Destroy()

    """
    This method runs the successful tests
    """
    def testChooseFacadePanel(self):
        facade = self.panel.getFacade()
        self.assertEquals("", facade)
        
        
        
        self.panel.setFacade(os.path.dirname(os.getcwd()) + os.sep + 'pythoneasyaccept_test' + os.sep + 'TestFacade.py')
        facade = self.panel.getFacade()
        self.assertEquals(os.path.dirname(os.getcwd()) + os.sep + 'pythoneasyaccept_test' + os.sep + 'TestFacade.py', facade)

    
if __name__ == '__main__':
    unittest.main() 